#include "MysqlMgr.h"



MysqlMgr::~MysqlMgr() {
    
}

int MysqlMgr::RegUser(const std::string& name, const std::string& email, const std::string& pwd)
{
    return _dao.RegUser(name, email, pwd);
}

MysqlMgr::MysqlMgr() {
}

bool MysqlMgr::CheckEmail(const std::string& name, const std::string& email) {
    return _dao.CheckEmail(name, email);
}

bool MysqlMgr::UpdatePwd(const std::string& name, const std::string& new_pwd) {
    return _dao.UpdatePwd(name, new_pwd);
}

bool MysqlMgr::CheckPwd(const std::string& email, const std::string& pwd, UserInfo& userInfo)
{
    return _dao.CheckPwd(email,pwd,userInfo);
}

bool MysqlMgr::AddFriendApply(const int& fromUID, const int& toUID)
{
    return _dao.AddFriendApply(fromUID, toUID);
}

std::shared_ptr<UserInfo> MysqlMgr::GetUser(int uid)
{
    return _dao.GetUser(uid);
}

std::shared_ptr<UserInfo> MysqlMgr::GetUser(const std::string& name)
{
    return _dao.GetUser(name);
}
